package com.js.blog.exception;

/**
 * @author yanglin
 * @create 2024-02-29 16:02 星期四
 * description:
 */
public enum OtherErrorCode implements IErrorCode {
    USER_NOT_LOGIN(3003,"用户未登录，请先登录"),
    USERNAME_OR_PASS_NULL(3004,"用户名或密码为空，不能注册！"),
    USER_NOT_NULL(3005,"用户不能为空！"),
    USER_NAME_EXIST(3006,"用户名已经存在"),
    USER_ID_NULL(3007,"用户主键为空"),
    USER_USERNAME_OR_PASS_ERROR(3008,"用户名或密码错误"),
    NOT_PUBLISH_PERMISSION(3009,"当前用户不具有发布权限"),
    PUBLISH_ARTICLE_NOT_EXIST(3010,"发布文章不存在，请重新发布");
    
    private long code;
    
    private String message;
    
    OtherErrorCode(long code,String message){
        this.code = code;
        this.message = message;
    }

    @Override
    public long getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
